# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy do
  @moduledoc """
  Represents a view of BiddingStrategies owned by and shared with the customer. In contrast to BiddingStrategy, this resource includes strategies owned by managers of the customer and shared with this customer - in addition to strategies owned by this customer. This resource does not provide metrics and only exposes a limited subset of the BiddingStrategy attributes.

  ## Attributes

  *   `id` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the bidding strategy.
  *   `maximizeConversionValue` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversionValue.t`, *default:* `nil`) - Output only. An automated bidding strategy to help get the most conversion value for your campaigns while spending your budget.
  *   `maximizeConversions` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversions.t`, *default:* `nil`) - Output only. An automated bidding strategy to help get the most conversions for your campaigns while spending your budget.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The name of the bidding strategy.
  *   `ownerCustomerId` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the Customer which owns the bidding strategy.
  *   `ownerDescriptiveName` (*type:* `String.t`, *default:* `nil`) - Output only. descriptive_name of the Customer which owns the bidding strategy.
  *   `resourceName` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the accessible bidding strategy. AccessibleBiddingStrategy resource names have the form: `customers/{customer_id}/accessibleBiddingStrategies/{bidding_strategy_id}`
  *   `targetCpa` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetCpa.t`, *default:* `nil`) - Output only. A bidding strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.
  *   `targetImpressionShare` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetImpressionShare.t`, *default:* `nil`) - Output only. A bidding strategy that automatically optimizes towards a chosen percentage of impressions.
  *   `targetRoas` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetRoas.t`, *default:* `nil`) - Output only. A bidding strategy that helps you maximize revenue while averaging a specific target Return On Ad Spend (ROAS).
  *   `targetSpend` (*type:* `GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetSpend.t`, *default:* `nil`) - Output only. A bid strategy that sets your bids to help get as many clicks as possible within your budget.
  *   `type` (*type:* `String.t`, *default:* `nil`) - Output only. The type of the bidding strategy.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :id => String.t() | nil,
          :maximizeConversionValue =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversionValue.t()
            | nil,
          :maximizeConversions =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversions.t()
            | nil,
          :name => String.t() | nil,
          :ownerCustomerId => String.t() | nil,
          :ownerDescriptiveName => String.t() | nil,
          :resourceName => String.t() | nil,
          :targetCpa =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetCpa.t()
            | nil,
          :targetImpressionShare =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetImpressionShare.t()
            | nil,
          :targetRoas =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetRoas.t()
            | nil,
          :targetSpend =>
            GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetSpend.t()
            | nil,
          :type => String.t() | nil
        }

  field(:id)

  field(:maximizeConversionValue,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversionValue
  )

  field(:maximizeConversions,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversions
  )

  field(:name)
  field(:ownerCustomerId)
  field(:ownerDescriptiveName)
  field(:resourceName)

  field(:targetCpa,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetCpa
  )

  field(:targetImpressionShare,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetImpressionShare
  )

  field(:targetRoas,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetRoas
  )

  field(:targetSpend,
    as:
      GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetSpend
  )

  field(:type)
end

defimpl Poison.Decoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy do
  def decode(value, options) do
    GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.SearchAds360.V0.Model.GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
